package org.csc.sss.api;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

@Slf4j
@SpringBootApplication
@ComponentScan({"org.csc.sss"})
@EntityScan("org.csc.sss.core.model")
@EnableJpaRepositories("org.csc.sss.core.repository")
@EnableSwagger2
public class ApiAppplication extends SpringBootServletInitializer {

	public static void main(String[] args) {
		SpringApplication.run(ApiAppplication.class, args);
		log.info("【api项目启动成功......】");
	}

	@Override
	protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
		return builder.sources(ApiAppplication.class);
	}
}


